package com.hzdp.web.action;

import org.springframework.beans.factory.annotation.Autowired;

import com.hzdp.entity.Product;
import com.hzdp.service.ProductService;

public class ProductAction extends BaseAction {

	private Product product;
	private int productId;

	@Autowired
	private ProductService productService;
	
	public String execute() {
		product = productService.findById(productId);
		return "success";
	}

	public void setProductId(int productId) {
		this.productId = productId;
	}



	public Product getProduct() {
		return product;
	}
}
